<?php

namespace app\index\controller;

use Sam\Factory;
use think\Controller;

class Base extends Controller
{
    protected $class_code;
    protected $member_id;
    protected $member;

    protected function initialize()
    {
        $top_nav = config("nav.");
        $top_pic = \PictureHelper::getPictures('index_top');


        $this->class_code = strtolower(request()->controller());
        $this->setSeo();


        $this->assign('top_pic',$top_pic);
        $this->assign('top_nav',$top_nav);
        $this->assign('class_code', $this->class_code);
       /* $member = Factory::createMember();
        $this->member_id = $member->get_id();
        $this->member = $member->get_userinfo();
        $this->assign('member', $this->member);*/
    }

    protected function setSeo($seo = [])
    {
        if (empty($seo)) {
            $seo = \SeoHelper::getSeo($seo);
        }
        $this->assign('seo', $seo);
    }

}